package com.leucoderma.medicine.service.impl;

import com.leucoderma.medicine.mapper.DrugsMapper;
import com.leucoderma.medicine.mapper.PatientMapper;
import com.leucoderma.medicine.pojo.Drugs;
import com.leucoderma.medicine.pojo.Patient;
import com.leucoderma.medicine.service.DrugsService;
import com.leucoderma.medicine.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DrugsServiceImpl implements DrugsService {
    @Autowired
    DrugsMapper drugsMapper;
    @Override
    public List<Drugs> listDrugs() {
        return drugsMapper.listDrugs();
    }

    @Override
    public Drugs getDrugById(int id) {
        return drugsMapper.getDrugById(id);
    }

    @Override
    public int insertNewDrug(Drugs drug) {
        return drugsMapper.insertNewDrug(drug);
    }
}
